package com.ruoyi.pos.mapper.transaction;

import com.ruoyi.pos.domain.transaction.PosSale;

import java.util.List;

/**
 * POS销售Mapper接口
 * 
 * @author ruoyi
 * @date 2025-01-30
 */
public interface PosSaleMapper {

    /**
     * 查询POS销售
     * 
     * @param saleId 销售ID
     * @return POS销售
     */
    public PosSale selectPosSaleById(Long saleId);

    /**
     * 根据交易流水号查询销售
     * 
     * @param transactionNo 交易流水号
     * @return POS销售
     */
    public PosSale selectPosSaleByTransactionNo(String transactionNo);

    /**
     * 查询POS销售列表
     * 
     * @param posSale POS销售
     * @return POS销售集合
     */
    public List<PosSale> selectPosSaleList(PosSale posSale);

    /**
     * 新增POS销售
     * 
     * @param posSale POS销售
     * @return 结果
     */
    public int insertPosSale(PosSale posSale);

    /**
     * 修改POS销售
     * 
     * @param posSale POS销售
     * @return 结果
     */
    public int updatePosSale(PosSale posSale);

    /**
     * 根据原销售ID查询退货记录
     * 
     * @param originalSaleId 原销售ID
     * @return 退货记录列表
     */
    public List<PosSale> selectRefundsByOriginalSaleId(Long originalSaleId);
}
